<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller {
  function _initialize(){
      $m = M("user");            
      if($_SESSION['nickname'] == "" || $_SESSION['username'] == ""){
          $this->error('您还没有登录,请先登录',U('Home/User/login'),3);
      }      
  }

  public function myRelust($result){
      if($result == false){
          $this->error("操作失败！");
      }else{
          $this->success("操作成功！");
      }                        
  } 
}